package top.lingkang.finalsession.solon;

import org.noear.solon.core.handle.Context;
import org.noear.solon.core.handle.SessionState;
import top.lingkang.finalsession.FinalSessionConfig;
import top.lingkang.finalsession.core.FinalGenerateSession;

/**
 * @author lingkang
 * @create by 2024/5/9 17:32
 */
public class GenerateSessionSolon implements FinalGenerateSession<Context, SessionState> {

    @Override
    public SessionState generateSession(Context context, FinalSessionConfig config) {
        String id = config.getIdGenerate().generateId(context, config);
        return new FinalSessionState(id);
    }
}
